// --------------------------------------------------------------------------------------------------------------------
// <copyright file="NavBenchmarkArguments.cs" company="Microsoft Corporation">
// The MIT License (MIT)
// 
// Copyright (c) 2014, Microsoft Corporation
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace Microsoft.Robotics.Navigation.Benchmark
{
    using System.Collections.Generic;
    using CmdLine;

    /// <summary>
    /// Representation of the command line arguments for Map converter
    /// </summary>
    [CommandLineArguments(Program = ProgramName, Title = Title, Description = Description)]
    public class NavBenchmarkArguments
    {
        /// <summary>
        /// The application description
        /// </summary>
        public const string Description = "Microsoft Navigation Benchmark Tool";

        /// <summary>
        /// The app title
        /// </summary>
        public const string Title = "Navigation Benchmark";

        /// <summary>
        /// The application name
        /// </summary>
        public const string ProgramName = "NavBenchmark";

        /// <summary>
        /// Gets or sets the mode.
        /// </summary>
        [CommandLineParameter(Command = "mode", Name = "mode", Default = "nav", Required = false,
            Description = "Specifies the mode of operation.  map|nav|calib", ValueExample = "/mode:map")
        ]
        public string Mode { get; set; }

        /// <summary>
        /// Gets or sets the port
        /// </summary>
        [CommandLineParameter(Command = "port", Name = "port", Default = "7576", Required = false,
            Description = "Specifies the port to listen on.", ValueExample = "/port:7576")
        ]
        public string Port { get; set; }

        /// <summary>
        /// Gets or sets the input folder path
        /// </summary>
        [CommandLineParameter(Command = "in", Name = "input folder", Default = @"..\Input", Required = false,
            Description = "Specifies the input folder containing the input and configuration files.", ValueExample = @"/in:C:\Temp")
        ]
        public string InputFolder { get; set; }

        /// <summary>
        /// Gets or sets the output folder path
        /// </summary>
        [CommandLineParameter(Command = "out", Name = "output folder", Default = @"..\Output", Required = false,
            Description = "Specifies the output folder to which generated files will be output.", ValueExample = @"/out:C:\Temp")
        ]
        public string OutputFolder { get; set; }

        /// <summary>
        /// Gets or sets the camera exposure
        /// </summary>
        [CommandLineParameter(Command = "exposure", Name = "camera exposure", Default = "null", Required = false,
            Description = "Specifies the camera exposure setting.", ValueExample = @"/exposure:-5")
        ]
        public string CameraExposure { get; set; }

        /// <summary>
        /// Gets or sets the camera focus
        /// </summary>
        [CommandLineParameter(Command = "focus", Name = "camera focus", Default = "null", Required = false,
            Description = "Specifies the camera focus setting.", ValueExample = @"/focus:0")
        ]
        public string CameraFocus { get; set; }

        /// <summary>
        /// Gets or sets the camera matching string
        /// </summary>
        [CommandLineParameter(Command = "camera", Name = "camera string", Default = "[\\w\\s]*LifeCam Cinema[.]*", Required = false,
            Description = "Specifies the camera string to match (regex).", ValueExample = @"/camera:[\\w\\s]*LifeCam Cinema[.]*")
        ]
        public string Camera { get; set; }

        /// <summary>
        /// Gets or sets the distance error threshold in millimeters
        /// </summary>
        [CommandLineParameter(Command = "maxDistErr", Name = "distance error threshold", Default = "null", Required = false,
            Description = "Specifies the maximum distance threshold before failing in millimeters.", ValueExample = @"/maxDistErr:750")
        ]
        public string DistanceErrorThreshold { get; set; }
        
        /// <summary>
        /// Gets or sets a value indicating whether help was requested.
        /// </summary>
        [CommandLineParameter(Command = "?", Default = false, Description = "Show Help", Name = "Help", IsHelp = true)]
        public bool Help { get; set; }
    }
}
